Skip to content

Retrieve Family Data - #6

Open
Alumniminium wants to merge 3 commits into
masterfrom
claude/get-family-data-011CUSYusB65sRdg8BWLXvLh
Open

Retrieve Family Data#6
Alumniminium wants to merge 3 commits into
masterfrom
claude/get-family-data-011CUSYusB65sRdg8BWLXvLh

Conversation

@Alumniminium

Copy link
Copy Markdown
Owner

No description provided.

- Update atlas.csproj target framework from net8.0 to net10.0
- Update Dockerfile SDK and runtime images to 10.0-alpine

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
High Priority:
- Remove 27 lines of dead proxy code from GenericServer.cs
- Fix critical bug in ReceivePayload() - was creating zero-length Memory<byte>
- Remove hardcoded user path /home/trbl/.dotnet in CGI.cs

Medium Priority:
- Add centralized error logging via Program.LogError()
- Simplify MIME type matching with Location.IsAllowedMimeType() helper
- Extract configuration defaults to static Defaults class

Low Priority:
- Simplify token replacement - remove Dictionary<Func>, use direct calls
- Simplify animated response logic - reduce duplication (35→28 lines)
- Consolidate request string normalization in Context.Request property
- Simplify certificate date validation for better readability

Summary:
- ~80 lines removed
- 1 critical bug fixed (file uploads would fail)
- Better maintainability and code clarity
- Zero features lost

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Routing Logic (GenericServer.cs):
- Extract handler methods: ServeDirectoryListing, ServeCGI, ServeFile, ValidateUpload
- Flatten nested directory/index handling with early returns
- Simplify text MIME check: use mimeType.StartsWith("text/")
- Simplify CGI line ending logic: use isFirstLine flag
- Remove duplicate size validation in ProcessFileUpload
- Better separation of concerns

CGI (CGI.cs):
- Extract environment setup: AddBaseEnvironmentVariables, AddGeminiEnvironmentVariables
- Remove duplicate AUTH_TYPE logic (was in 2 places)
- Remove ExecuteScript overload - merged into single method RunScript
- Simplify process output handling: cleaner null checks
- Use using statement for Process disposal
- Improve error output handling

Upload Processing (TitanUploader.cs):
- Parse Titan parameters efficiently with LINQ
- Extract ParseTitanParameters helper method
- Use Defaults.DefaultMimeType constant
- More concise and readable

Results:
- ~50 lines net reduction
- Better method organization
- Single responsibility principle
- No features lost
- More maintainable

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants